/**
 * @description 获取应用信息
 * @returns { object }  版本号、appId、环境
 * */
function generateQr({ content = '', width = 200, target }) {
  if (content === '' || content === null) {
    return;
  }
  my.generateImageFromCode({
    code: content,
    format: 'QRCODE',
    width: width,
    correctLevel: 'H',
    success: (res) => {
      // TODO
      //  成功提示
      target = res.image;
    },
    fail(res) {},
    complete(res) {},
  });
}

export default generateQr;
